package com.ibeeking.found.msg.service.common.param;

import com.ibeeking.found.msg.service.common.query.WxMpFansPageQuery;
import com.ibeeking.nematos.utils.base.BaseValidationGroup;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName WxMpGroupMessageParam
 * @Description
 * @Author ibeeking
 * @Date 2020-12-25 11:20
 **/
@Data
@Accessors(chain = true)
public class WxMpGroupMessageUploadParam implements Serializable {
	private static final long serialVersionUID = 1L;



	/**
	 * 关联微信公众号id
	 */
	@NotNull(message = "关联微信公众号id不能为空", groups = {BaseValidationGroup.Update.class, BaseValidationGroup.Insert.class})
	private String appId;

	/**
	 * 全部用户发送
	 */
	@NotNull(message = "是否发送全部用户不能为空", groups = {BaseValidationGroup.Update.class, BaseValidationGroup.Insert.class})
	private Integer allSend;

	/**
	 * 发送方式
	 */
	private String sendType;

	private List<String> tagIds = new ArrayList<>();

	private FansObject fansObject = new FansObject();

	private Message message = new Message();

	/**
	 * 当系统判断为转载是否还转发
	 */
	private Integer sendIgnoreReprintl = 1;

	@Data
	public static class FansObject {

		private List<String> userIds = new ArrayList<>();

		private WxMpFansPageQuery wxMpFansPageQuery = new WxMpFansPageQuery();

	}

	@Data
	public static class Message{

		/**
		 * 消息类型
		 */
		@NotNull(message = "消息类型不能为空", groups = {BaseValidationGroup.Update.class, BaseValidationGroup.Insert.class})
		private Integer messageType;

		/**
		 * 消息类型字符串
		 */
		@NotNull(message = "消息类型明文不能为空", groups = {BaseValidationGroup.Update.class, BaseValidationGroup.Insert.class})
		private String messageTypeString;


		/**
		 * 内容
		 */
		private String content;

		/**
		 * 批次号
		 */
		private Long batchNo;

		/**
		 * 微信端媒体Id
		 */
		private String mediaId;

		/**
		 * 本地媒体Id
		 */
		private Long localMediaId;

		/**
		 * 图片功能使用 推荐内容
		 */
		private String recommend;
		/**
		 * 图片功能使用 是否打开评论 1打开 2关闭
		 */
		private Integer needOpenComment = 1;

		/**
		 * 图片功能使用 是否打开只允许粉丝评论
		 * 1打开 2关闭
		 */
		private Integer onlyFansCanComment = 2;

		private String menuSourceType;

		private String unionKey;

	}

	private Long createBy;

	private Long modifyBy;

	private String remark;





}
